from gxl_ai_utils.utils import utils_file
import json
# json_path = "./nodes_config_zw_all_11node.json"
# config = json.load(open(json_path, "r"))
# json_path = "./nodes_config_zw_all_20node.json"
# config2 = json.load(open(json_path, "r"))
#
# nodes_list1 = config["nodes"]
# nodes_list2 = config2["nodes"]
# all_nodes = nodes_list1 + nodes_list2
# for i, node_dict_i in enumerate(all_nodes):
#     node_dict_i["node_id"] = i
#
# all_dict = {}
# all_dict["nodes"] = all_nodes
#
# output_path = "./nodes_config_zw_all_33node.json"
# json.dump(all_dict, open(output_path, "w"), indent=4)

# ------------------
json_path = "./nodes_ssl_28.json"
config = json.load(open(json_path, "r"))
nodes_list = config["nodes"]
for i, node_dict_i in enumerate(nodes_list):
    node_dict_i["node_id"] = i
json.dump(config, open(json_path, "w"), indent=4)
